package yancy.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import yancy.common.validator.group.AddGroup;
import yancy.common.validator.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@TableName("sys_book_author")
public class SysBookAuthor {
  @TableId
  @NotNull(message="书籍id不能为空", groups = {UpdateGroup.class})
  private Long id;
  @NotBlank(message="bookId不能为空", groups = {AddGroup.class, UpdateGroup.class})

  private Long bookId;
  @NotBlank(message="authorId不能为空", groups = {AddGroup.class, UpdateGroup.class})
  private Long authorId;
  private Long status;



}
